package com.yao.repository;

import com.yao.dataobject.OrderMaster;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * User: 姚宏武
 * Date: 2017/11/18
 * Time: 10:50
 * Email：401369870@qq.com
 * Description: 订单dao层
 */
public interface OrderMasterRepository extends JpaRepository<OrderMaster, String> {

    /**
     * 根据买家的openid分页查询订单
     *
     * @param buyerOpenid 买家openid
     * @param pageable    分页参数
     * @return
     */
    Page<OrderMaster> findByBuyerOpenid(String buyerOpenid, Pageable pageable);
}
